var ( // ErrWrapPlaintext is returned if the plaintext is not a multiple // of 64 bits. ErrWrapPlaintext = errors.New("keywrap: plainText must be a multiple of 64 bits") // ErrUnwrapCiphertext is returned if the ciphertext is not a // multiple of 64 bits. ErrUnwrapCiphertext = errors.New("keywrap: cipherText must by a multiple of 64 bits") // ErrUnwrapFailed is returned if unwrapping a key fails. ErrUnwrapFailed = errors.New("keywrap: failed to unwrap key") // ErrInvalidKey is returned when the AES key is invalid. ErrInvalidKey = errors.New("keywrap: invalid AES key") )
func Unwrap(key, cipherText []byte) ([]byte, error)
Unwrap a key using the RFC 3394 AES Key Wrap Algorithm.
func Wrap(key, plainText []byte) ([]byte, error)
Wrap a key using the RFC 3394 AES Key Wrap Algorithm.