Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(298)

Delta Between Two Patch Sets: src/pkg/crypto/cipher/ecb_aes_test.go

Issue 7860047: code review 7860047: crypto/cipher: Added BlockMode for ECB Encryption and D...
Left Patch Set: diff -r 419dcca62a3d https://code.google.com/p/go Created 11 years ago
Right Patch Set: diff -r 6dad366e9f94 https://code.google.com/p/go Created 10 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/crypto/cipher/ecb.go ('k') | src/pkg/crypto/cipher/example_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // ECB AES test vectors. 5 // ECB AES test vectors.
6 6
7 // See U.S. National Institute of Standards and Technology (NIST) 7 // See U.S. National Institute of Standards and Technology (NIST)
8 // Special Publication 800-38A, ``Recommendation for Block Cipher 8 // Special Publication 800-38A, ``Recommendation for Block Cipher
9 // Modes of Operation,'' 2001 Edition, pp. 24-29. 9 // Modes of Operation,'' 2001 Edition, pp. 24-29.
10 10
11 package cipher_test 11 package cipher_test
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 decrypter := cipher.NewECBDecrypter(c) 79 decrypter := cipher.NewECBDecrypter(c)
80 p := make([]byte, len(d)) 80 p := make([]byte, len(d))
81 decrypter.CryptBlocks(p, d) 81 decrypter.CryptBlocks(p, d)
82 if !bytes.Equal(tt.in, p) { 82 if !bytes.Equal(tt.in, p) {
83 t.Errorf("%s: ECBDecrypter\nhave %x\nwant %x", test, d, tt.in) 83 t.Errorf("%s: ECBDecrypter\nhave %x\nwant %x", test, d, tt.in)
84 } 84 }
85 } 85 }
86 } 86 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b