Class ProtoKeySerialization


  • @Immutable
    public final class ProtoKeySerialization
    extends java.lang.Object
    A representation of a Key object, prepared for the Tink proto keyset format.

    ProtoKeySerialization objects fully describe a Key object, but they are such that the TinkProtoKeysetFormat can be easily obtained from it.

    • Method Detail

      • create

        public static ProtoKeySerialization create​(java.lang.String typeUrl,
                                                   com.google.protobuf.ByteString value,
                                                   ProtoKeySerialization.KeyMaterialType keyMaterialType,
                                                   ProtoKeySerialization.OutputPrefixType outputPrefixType,
                                                   @Nullable
                                                   java.lang.Integer idRequirement)
                                            throws java.security.GeneralSecurityException
        Creates new ProtoKeySerialization objects.

        Throws an exception if (idRequirement == null) != (outputPrefixType == RAW) or if typeUrl does not consist entirely of ASCII characters.

        Throws:
        java.security.GeneralSecurityException
      • getTypeUrl

        public java.lang.String getTypeUrl()
      • getValue

        public com.google.protobuf.ByteString getValue()
      • getIdRequirementOrNull

        @Nullable
        public java.lang.Integer getIdRequirementOrNull()