use of com.google.crypto.tink.subtle.AesEaxJce in project tink by google.
the class AesEaxKeyManager method getPrimitive.
/**
* @param key {@code AesEaxKey} proto
*/
@Override
public Aead getPrimitive(MessageLite key) throws GeneralSecurityException {
if (!(key instanceof AesEaxKey)) {
throw new GeneralSecurityException("expected AesEaxKey proto");
}
AesEaxKey keyProto = (AesEaxKey) key;
validate(keyProto);
return new AesEaxJce(keyProto.getKeyValue().toByteArray(), keyProto.getParams().getIvSize());
}
Aggregations