Class PrimitiveFactory<PrimitiveT,​KeyProtoT extends com.google.protobuf.MessageLite>


  • public abstract class PrimitiveFactory<PrimitiveT,​KeyProtoT extends com.google.protobuf.MessageLite>
    extends java.lang.Object
    A PrimitiveFactory knows how to create primitives from a given key.
    • Constructor Detail

      • PrimitiveFactory

        public PrimitiveFactory​(java.lang.Class<PrimitiveT> clazz)
    • Method Detail

      • getPrimitive

        public abstract PrimitiveT getPrimitive​(KeyProtoT key)
                                         throws java.security.GeneralSecurityException
        Creates a new instance of PrimitiveT.

        For primitives of type Mac, Aead, PublicKeySign, PublicKeyVerify, DeterministicAead, HybridEncrypt, and HybridDecrypt this should be a primitive which ignores the output prefix and assumes "RAW".

        Throws:
        java.security.GeneralSecurityException