Example #1
0
// NewCipher192 creates an abstract.Cipher based on the AES-192 block cipher
// and the SHA2-384 hash algorithm.
func NewCipher192(key []byte, options ...interface{}) abstract.Cipher {
	return cipher.FromBlock(aes.NewCipher, sha512.New384,
		aes.BlockSize, 192/8, 384/8, key, options...)
}
Example #2
0
// NewCipher256 creates an abstract.Cipher based on the AES-256 block cipher
// and the SHA2-512 hash algorithm.
func NewCipher256(key []byte, options ...interface{}) abstract.Cipher {
	return cipher.FromBlock(aes.NewCipher, sha512.New,
		aes.BlockSize, 256/8, 512/8, key, options...)
}
Example #3
0
// NewCipher128 creates an abstract.Cipher based on the AES-128 block cipher
// and the SHA2-256 hash algorithm.
func NewCipher128(key []byte, options ...interface{}) abstract.Cipher {
	return cipher.FromBlock(aes.NewCipher, sha256.New,
		aes.BlockSize, 128/8, 256/8, key, options...)
}