Class PrfSet


  • @Immutable
    public abstract class PrfSet
    extends java.lang.Object
    A Tink Keyset can be converted into a set of PRFs using this primitive. Every key in the keyset corresponds to a PRF in the PRFSet. Every PRF in the set is given an ID, which is the same ID as the key id in the Keyset.
    • Constructor Summary

      Constructors 
      Constructor Description
      PrfSet()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] computePrimary​(byte[] input, int outputLength)
      Convenience method to compute the primary PRF on a given input.
      abstract java.util.Map<java.lang.Integer,​Prf> getPrfs()
      A map of the PRFs represented by the keys in this keyset.
      abstract int getPrimaryId()
      Returns the primary ID of the keyset.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrfSet

        public PrfSet()
    • Method Detail

      • getPrimaryId

        public abstract int getPrimaryId()
        Returns the primary ID of the keyset.
      • getPrfs

        public abstract java.util.Map<java.lang.Integer,​Prf> getPrfs()
                                                                    throws java.security.GeneralSecurityException
        A map of the PRFs represented by the keys in this keyset. The map is guaranteed to contain getPrimaryId() as a key.
        Throws:
        java.security.GeneralSecurityException
      • computePrimary

        public byte[] computePrimary​(byte[] input,
                                     int outputLength)
                              throws java.security.GeneralSecurityException
        Convenience method to compute the primary PRF on a given input. See PRF.compute for details of the parameters.
        Throws:
        java.security.GeneralSecurityException