Packages

trait CryptoPureApi extends EncryptionOps with SigningOps with HmacOps with HkdfOps with HashOps with RandomOps

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CryptoPureApi
  2. RandomOps
  3. HashOps
  4. HkdfOps
  5. HmacOps
  6. SigningOps
  7. EncryptionOps
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def computeHkdfInternal(keyMaterial: ByteString, outputBytes: Int, info: HkdfInfo, salt: ByteString = ByteString.EMPTY, algorithm: HmacAlgorithm = defaultHmacAlgorithm): Either[HkdfError, SecureRandomness]
    Attributes
    protected
    Definition Classes
    HkdfOps
  2. abstract def createSymmetricKey(bytes: SecureRandomness, scheme: SymmetricKeyScheme = defaultSymmetricKeyScheme): Either[EncryptionKeyCreationError, SymmetricKey]

    Creates a symmetric key with the specified scheme for the given randomness.

    Creates a symmetric key with the specified scheme for the given randomness.

    Definition Classes
    EncryptionOps
  3. abstract 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
    EncryptionOps
  4. abstract def decryptWithInternal[M](encrypted: AsymmetricEncrypted[M], privateKey: EncryptionPrivateKey)(deserialize: (ByteString) => Either[DeserializationError, M]): Either[DecryptionError, M]
    Attributes
    protected
    Definition Classes
    EncryptionOps
  5. abstract def defaultHashAlgorithm: HashAlgorithm
    Definition Classes
    HashOps
  6. abstract def defaultSymmetricKeyScheme: SymmetricKeyScheme
    Definition Classes
    EncryptionOps
  7. abstract def encryptDeterministicWith[M <: HasVersionedToByteString](message: M, publicKey: EncryptionPublicKey, version: ProtocolVersion)(implicit traceContext: TraceContext): Either[EncryptionError, AsymmetricEncrypted[M]]

    Deterministically encrypts the given bytes using the given public key.

    Deterministically encrypts the given bytes using the given public key. This is unsafe for general use and it's only used to encrypt the decryption key of each view

    Definition Classes
    EncryptionOps
  8. abstract def encryptWith[M <: HasToByteString](message: M, symmetricKey: SymmetricKey): Either[EncryptionError, Encrypted[M]]

    Encrypts the bytes of the serialized message using the given symmetric key.

    Encrypts the bytes of the serialized message using the given symmetric key. Where the message embedded protocol version determines the message serialization.

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

    Encrypts the bytes of the serialized message using the given symmetric key.

    Encrypts the bytes of the serialized message using the given symmetric key. The given protocol version determines the message serialization.

    Definition Classes
    EncryptionOps
  10. abstract def encryptWith[M <: HasToByteString](message: M, publicKey: EncryptionPublicKey): Either[EncryptionError, AsymmetricEncrypted[M]]

    Encrypts the bytes of the serialized message using the given public key.

    Encrypts the bytes of the serialized message using the given public key. Where the message embedded protocol version determines the message serialization.

    Definition Classes
    EncryptionOps
  11. abstract def encryptWith[M <: HasVersionedToByteString](message: M, publicKey: EncryptionPublicKey, version: ProtocolVersion): Either[EncryptionError, AsymmetricEncrypted[M]]

    Encrypts the bytes of the serialized message using the given public key.

    Encrypts the bytes of the serialized message using the given public key. The given protocol version determines the message serialization.

    Definition Classes
    EncryptionOps
  12. abstract def generateRandomBytes(length: Int): Array[Byte]
    Attributes
    protected
    Definition Classes
    RandomOps
  13. abstract def generateSymmetricKey(scheme: SymmetricKeyScheme = defaultSymmetricKeyScheme): 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
    EncryptionOps
  14. abstract def hkdfExpandInternal(keyMaterial: SecureRandomness, outputBytes: Int, info: HkdfInfo, algorithm: HmacAlgorithm = defaultHmacAlgorithm): Either[HkdfError, SecureRandomness]
    Attributes
    protected
    Definition Classes
    HkdfOps
  15. abstract def sign(bytes: ByteString, signingKey: SigningPrivateKey): Either[SigningError, Signature]
    Attributes
    protected[crypto]
    Definition Classes
    SigningOps
  16. abstract def verifySignature(bytes: ByteString, publicKey: SigningPublicKey, signature: Signature): Either[SignatureCheckError, Unit]
    Attributes
    protected[crypto]
    Definition Classes
    SigningOps

Concrete 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() @IntrinsicCandidate()
  7. def computeHkdf(keyMaterial: ByteString, outputBytes: Int, info: HkdfInfo, salt: ByteString = ByteString.EMPTY, algorithm: HmacAlgorithm = defaultHmacAlgorithm): Either[HkdfError, SecureRandomness]

    Produce a new secret from the given key material using the HKDF from RFC 5869 with both extract and expand phases.

    Produce a new secret from the given key material using the HKDF from RFC 5869 with both extract and expand phases.

    keyMaterial

    Input key material from which to derive another key.

    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.

    salt

    Optional salt. Should be set if the input key material is not cryptographically secure, uniformly random.

    algorithm

    The hash algorithm to be used for the HKDF construction

    Definition Classes
    HkdfOps
  8. def decryptWith[M](encrypted: AsymmetricEncrypted[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
    EncryptionOps
  9. def defaultHmacAlgorithm: HmacAlgorithm
    Definition Classes
    HmacOps
  10. 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
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def generateRandomByteString(length: Int): ByteString
    Definition Classes
    RandomOps
  14. def generateSecureRandomness(length: Int): SecureRandomness
    Definition Classes
    RandomOps
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. def hmacWithSecret(secret: HmacSecret, message: ByteString, algorithm: HmacAlgorithm = defaultHmacAlgorithm): Either[HmacError, Hmac]
    Definition Classes
    HmacOps
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  22. 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
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. 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
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. 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
    Deprecated

Inherited from RandomOps

Inherited from HashOps

Inherited from HkdfOps

Inherited from HmacOps

Inherited from SigningOps

Inherited from EncryptionOps

Inherited from AnyRef

Inherited from Any

Ungrouped