Packages

class JcePureCrypto extends CryptoPureApi with ShowUtil

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JcePureCrypto
  2. ShowUtil
  3. ShowSyntax
  4. ToShowOps
  5. CryptoPureApi
  6. HashOps
  7. HkdfOps
  8. HmacOps
  9. SigningOps
  10. EncryptionOps
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new JcePureCrypto(javaKeyConverter: JceJavaConverter, defaultSymmetricKeyScheme: SymmetricKeyScheme, defaultHashAlgorithm: HashAlgorithm)

Type Members

  1. implicit class ShowAnyRefSyntax extends AnyRef
    Definition Classes
    ShowUtil
  2. implicit class ShowEitherSyntax[L, R] extends AnyRef

    Enables the syntax show"${myEither.showMerged}".

    Enables the syntax show"${myEither.showMerged}".

    Definition Classes
    ShowUtil
  3. implicit class ShowLengthLimitedStringSyntax extends StringOperators
    Definition Classes
    ShowUtil
  4. implicit class ShowLengthLimitedStringWrapperSyntax extends StringOperators
    Definition Classes
    ShowUtil
  5. implicit class ShowOptionSyntax[T] extends AnyRef
    Definition Classes
    ShowUtil
  6. implicit class ShowProductSyntax extends AnyRef
    Definition Classes
    ShowUtil
    Annotations
    @SuppressWarnings()
  7. implicit class ShowStringSyntax extends StringOperators
    Definition Classes
    ShowUtil
  8. implicit class ShowTraversableSyntax[T] extends AnyRef

    Enables syntax like show"Found several elements: ${myCollection.mkShow()}".

    Enables syntax like show"Found several elements: ${myCollection.mkShow()}".

    Definition Classes
    ShowUtil
  9. abstract class StringOperators extends AnyRef

    Enables syntax like show"This is a string: ${myString.doubleQuoted}" and show"This is a hash: ${myHash.readableHash}".

    Enables syntax like show"This is a string: ${myString.doubleQuoted}" and show"This is a hash: ${myHash.readableHash}".

    Definition Classes
    ShowUtil

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def build(purpose: HashPurpose, algorithm: HashAlgorithm = defaultHashAlgorithm): HashBuilder

    Creates a HashBuilder for computing a hash with the given purpose.

    Creates a HashBuilder for computing a hash with the given purpose. For different purposes purpose1 and purpose2, all implementations must ensure that it is computationally infeasible to find a sequence bs of com.google.protobuf.ByteStrings such that bs.foldLeft(hashBuilder(purpose1))((b, hb) => hb.add(b)).finish and bs.foldLeft(hashBuilder(purpose2))((b, hb) => hb.add(b)).finish yield the same hash.

    Definition Classes
    HashOps
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def decryptWith[M](encrypted: Encrypted[M], symmetricKey: SecureRandomness, scheme: SymmetricKeyScheme)(deserialize: (ByteString) => Either[DeserializationError, M]): Either[DecryptionError, M]

    Decrypts a message encrypted using encryptWith

    Decrypts a message encrypted using encryptWith

    Definition Classes
    JcePureCryptoEncryptionOps
  8. def decryptWith[M](encrypted: Encrypted[M], symmetricKey: SymmetricKey)(deserialize: (ByteString) => Either[DeserializationError, M]): Either[DecryptionError, M]

    Decrypts a message encrypted using encryptWith

    Decrypts a message encrypted using encryptWith

    Definition Classes
    JcePureCryptoEncryptionOps
  9. def decryptWith[M](encrypted: Encrypted[M], privateKey: EncryptionPrivateKey)(deserialize: (ByteString) => Either[DeserializationError, M]): Either[DecryptionError, M]

    Decrypts a message encrypted using encryptWith

    Decrypts a message encrypted using encryptWith

    Definition Classes
    JcePureCryptoEncryptionOps
  10. val defaultHashAlgorithm: HashAlgorithm
    Definition Classes
    JcePureCryptoHashOps
  11. def defaultHmacAlgorithm: HmacAlgorithm
    Definition Classes
    HmacOps
  12. val defaultSymmetricKeyScheme: SymmetricKeyScheme
    Definition Classes
    JcePureCryptoEncryptionOps
  13. def digest(purpose: HashPurpose, bytes: ByteString, algorithm: HashAlgorithm = defaultHashAlgorithm): Hash

    Convenience method for build(purpose).addWithoutLengthPrefix(bytes).finish

    Convenience method for build(purpose).addWithoutLengthPrefix(bytes).finish

    Definition Classes
    HashOps
  14. def encryptWith[M <: HasVersionedToByteString](message: M, symmetricKey: SecureRandomness, version: ProtocolVersion, scheme: SymmetricKeyScheme): Either[EncryptionError, Encrypted[M]]

    Encrypts the given message with the given randomness as the symmetric key for the given scheme.

    Encrypts the given message with the given randomness as the symmetric key for the given scheme.

    TODO(i4612): this is a bit of a kludge; a cleaner way would be to provide a conversion from SecureRandom to SymmetricKey, and use the encryptWith method, but that's annoying to do with Tink. Clean up once Tink is removed,

    Definition Classes
    JcePureCryptoEncryptionOps
  15. def encryptWith[M <: HasVersionedToByteString](message: M, symmetricKey: SymmetricKey, version: ProtocolVersion): Either[EncryptionError, Encrypted[M]]

    Encrypts the given message with the given symmetric key

    Encrypts the given message with the given symmetric key

    Definition Classes
    JcePureCryptoEncryptionOps
  16. def encryptWith[M <: HasVersionedToByteString](message: M, publicKey: EncryptionPublicKey, version: ProtocolVersion): Either[EncryptionError, Encrypted[M]]

    Encrypts the given bytes using the given public key

    Encrypts the given bytes using the given public key

    Definition Classes
    JcePureCryptoEncryptionOps
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. def generateSymmetricKey(scheme: SymmetricKeyScheme): Either[EncryptionKeyGenerationError, SymmetricKey]

    Generates and returns a random symmetric key using the specified scheme.

    Generates and returns a random symmetric key using the specified scheme.

    Definition Classes
    JcePureCryptoEncryptionOps
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def hkdfExpand(keyMaterial: SecureRandomness, outputBytes: Int, info: HkdfInfo, algorithm: HmacAlgorithm = defaultHmacAlgorithm): Either[HkdfError, SecureRandomness]

    Produce a new secret from the given secret and purpose

    Produce a new secret from the given secret and purpose

    keyMaterial

    Cryptographically secure, uniformly random initial key material. Must be at least as long as the length of the hash function chosen for the HMAC scheme.

    outputBytes

    The length of the produced secret. May be at most 255 times the size of the output of the selected hashing algorithm. If you need to derive multiple keys, set the info parameter to different values, for each key that you need.

    info

    Specify the purpose of the derived key (optional). Note that you can derive multiple independent keys from the same key material by varying the purpose.

    algorithm

    The hash algorithm to be used for the HKDF construction

    Definition Classes
    HkdfOps
  23. def hmacWithSecret(secret: HmacSecret, message: ByteString, algorithm: HmacAlgorithm = defaultHmacAlgorithm): Either[HmacError, Hmac]
    Definition Classes
    HmacOps
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. implicit final def showInterpolator(sc: StringContext): ShowInterpolator
    Definition Classes
    ShowSyntax
  29. implicit def showPretty[T](implicit arg0: Pretty[T]): Show[T]

    Enables the syntax show"This object is pretty: $myPrettyType".

    Enables the syntax show"This object is pretty: $myPrettyType".

    Definition Classes
    ShowUtil
  30. def sign(bytes: ByteString, signingKey: SigningPrivateKey): Either[SigningError, Signature]
    Attributes
    protected[crypto]
    Definition Classes
    JcePureCryptoSigningOps
  31. def sign(hash: Hash, signingKey: SigningPrivateKey): Either[SigningError, Signature]

    Signs the given hash using the private signing key.

    Signs the given hash using the private signing key.

    Definition Classes
    SigningOps
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. implicit def toShow[A](target: A)(implicit tc: Show[A]): Ops[A]
    Definition Classes
    ToShowOps
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. def verifySignature(bytes: ByteString, publicKey: SigningPublicKey, signature: Signature): Either[SignatureCheckError, Unit]
    Attributes
    protected[crypto]
    Definition Classes
    JcePureCryptoSigningOps
  36. def verifySignature(hash: Hash, publicKey: SigningPublicKey, signature: Signature): Either[SignatureCheckError, Unit]

    Confirms if the provided signature is a valid signature of the payload using the public key

    Confirms if the provided signature is a valid signature of the payload using the public key

    Definition Classes
    SigningOps
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from ShowUtil

Inherited from ShowSyntax

Inherited from ToShowOps

Inherited from CryptoPureApi

Inherited from HashOps

Inherited from HkdfOps

Inherited from HmacOps

Inherited from SigningOps

Inherited from EncryptionOps

Inherited from AnyRef

Inherited from Any

Ungrouped