Class SealedMessageEncrypter


  • public class SealedMessageEncrypter
    extends java.lang.Object
    A sealed message encrypter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.token.proto.common.security.SecurityProtos.SealedMessage encrypt​(java.lang.String payload, java.lang.String keyId, io.token.proto.common.security.SecurityProtos.SealedMessage.MethodCase method)
      Encrypts the specified message.
      • Methods inherited from class java.lang.Object

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

      • SealedMessageEncrypter

        public SealedMessageEncrypter​(SecretKeyStore secretKeyStore,
                                      TrustedKeyStore trustedKeyStore)
        Creates a new instance of the encrypter.
        Parameters:
        secretKeyStore - the secret keystore to use
        trustedKeyStore - the trusted keystore to use
    • Method Detail

      • encrypt

        public io.token.proto.common.security.SecurityProtos.SealedMessage encrypt​(java.lang.String payload,
                                                                                   java.lang.String keyId,
                                                                                   io.token.proto.common.security.SecurityProtos.SealedMessage.MethodCase method)
        Encrypts the specified message.
        Parameters:
        payload - the payload to encrypt
        keyId - the id of the key to use
        method - the cipher method to use for encryption
        Returns:
        a sealed message