public class PrivilegedRegistry extends Object
Access is granted on the BUILD.bazel-file level. This is internal and should not be used externally.
| Modifier and Type | Method and Description |
|---|---|
static KeyData |
deriveKey(KeyTemplate keyTemplate,
InputStream randomStream)
Method to derive a key, using the given , with the randomness as provided
by the second argument.
|
static com.google.protobuf.MessageLite |
parseKeyData(KeyData keyData)
Returns the key proto in the keyData if a corresponding key type manager was registered.
|
public static KeyData deriveKey(KeyTemplate keyTemplate, InputStream randomStream) throws GeneralSecurityException
This method is on purpose not in the public interface. Calling it twice using different key templates and the same randomness can completely destroy any security in a system, so we prevent this by making it accessible only to safe call sites.
This functions ignores keyTemplate.getOutputPrefix().
GeneralSecurityExceptionpublic static com.google.protobuf.MessageLite parseKeyData(KeyData keyData) throws GeneralSecurityException, com.google.protobuf.InvalidProtocolBufferException
KeyManager (and not a KeyTypeManager).GeneralSecurityExceptioncom.google.protobuf.InvalidProtocolBufferException