Packages

class JcePureCrypto extends CryptoPureApi with ShowUtil with NamedLogging

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

Instance Constructors

  1. new JcePureCrypto(defaultSymmetricKeyScheme: SymmetricKeyScheme, defaultSigningAlgorithmSpec: SigningAlgorithmSpec, supportedSigningAlgorithmSpecs: NonEmpty[Set[SigningAlgorithmSpec]], defaultEncryptionAlgorithmSpec: EncryptionAlgorithmSpec, supportedEncryptionAlgorithmSpecs: NonEmpty[Set[EncryptionAlgorithmSpec]], defaultHashAlgorithm: HashAlgorithm, defaultPbkdfScheme: PbkdfScheme, loggerFactory: NamedLoggerFactory)

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:

    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]) @IntrinsicCandidate() @native()
  7. def createSymmetricKey(bytes: SecureRandomness, scheme: SymmetricKeyScheme): 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
    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: 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
  10. def decryptWithInternal[M](encrypted: AsymmetricEncrypted[M], privateKey: EncryptionPrivateKey)(deserialize: (ByteString) => Either[DeserializationError, M]): Either[DecryptionError, M]
    Attributes
    protected[crypto]
    Definition Classes
    JcePureCryptoEncryptionOps
  11. def decryptWithPassword[M](pbencrypted: PasswordBasedEncrypted, password: String)(deserialize: (ByteString) => Either[DeserializationError, M]): Either[PasswordBasedEncryptionError, M]
    Definition Classes
    PasswordBasedEncryptionOps
  12. val defaultEncryptionAlgorithmSpec: EncryptionAlgorithmSpec
    Definition Classes
    JcePureCryptoEncryptionOps
  13. val defaultHashAlgorithm: HashAlgorithm
    Definition Classes
    JcePureCryptoHashOps
  14. def defaultHmacAlgorithm: HmacAlgorithm
    Definition Classes
    HmacOps
  15. val defaultPbkdfScheme: PbkdfScheme
  16. val defaultSigningAlgorithmSpec: SigningAlgorithmSpec
    Definition Classes
    JcePureCryptoSigningOps
  17. val defaultSymmetricKeyScheme: SymmetricKeyScheme
    Definition Classes
    JcePureCryptoEncryptionOps
  18. def deriveSymmetricKey(password: String, symmetricKeyScheme: SymmetricKeyScheme, pbkdfScheme: PbkdfScheme, saltO: Option[SecureRandomness]): Either[PasswordBasedEncryptionError, PasswordBasedEncryptionKey]

    Derive a symmetric encryption key from a given password.

    Derive a symmetric encryption key from a given password.

    password

    The password used to derive the key

    symmetricKeyScheme

    The intended symmetric encryption scheme for the password-based encryption.

    pbkdfScheme

    The password-based key derivation function (PBKDF) scheme to derive a key from the password.

    saltO

    The optional salt used for the key derivation. If none is a given a random salt is generated.

    Definition Classes
    JcePureCryptoPasswordBasedEncryptionOps
  19. 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
  20. def encryptDeterministicWith[M <: HasToByteString](message: M, publicKey: EncryptionPublicKey, encryptionAlgorithmSpec: EncryptionAlgorithmSpec = defaultEncryptionAlgorithmSpec)(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
    JcePureCryptoEncryptionOps
  21. def encryptSymmetricWith[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
  22. def encryptWith[M <: HasToByteString](message: M, publicKey: EncryptionPublicKey, encryptionAlgorithmSpec: EncryptionAlgorithmSpec = defaultEncryptionAlgorithmSpec): 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.

    Definition Classes
    JcePureCryptoEncryptionOps
  23. def encryptWithPassword(message: ByteString, password: String, symmetricKeyScheme: SymmetricKeyScheme = defaultSymmetricKeyScheme, pbkdfScheme: PbkdfScheme = defaultPbkdfScheme): Either[PasswordBasedEncryptionError, PasswordBasedEncrypted]
    Definition Classes
    PasswordBasedEncryptionOps
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  26. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  27. def generateRandomByteString(length: Int): ByteString
    Definition Classes
    RandomOps
  28. def generateRandomBytes(length: Int): Array[Byte]
    Attributes
    protected[crypto]
    Definition Classes
    JcePureCryptoRandomOps
  29. def generateSecureRandomness(length: Int): SecureRandomness
    Definition Classes
    RandomOps
  30. 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
  31. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  32. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  33. def hmacWithSecret(secret: HmacSecret, message: ByteString, algorithm: HmacAlgorithm = defaultHmacAlgorithm): Either[HmacError, Hmac]
    Definition Classes
    HmacOps
  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  36. val loggerFactory: NamedLoggerFactory
    Definition Classes
    JcePureCryptoNamedLogging
  37. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  38. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  39. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  40. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  42. implicit final def showInterpolator(sc: StringContext): ShowInterpolator
    Definition Classes
    ShowSyntax
  43. 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
  44. def sign(hash: Hash, signingKey: SigningPrivateKey, usage: NonEmpty[Set[SigningKeyUsage]], signingAlgorithmSpec: SigningAlgorithmSpec = defaultSigningAlgorithmSpec)(implicit traceContext: TraceContext): Either[SigningError, Signature]

    Signs the given hash using the private signing key.

    Signs the given hash using the private signing key.

    usage

    the usage we intend to enforce. If multiple usages are enforced, at least one of them must be satisfied. In other words, the provided signing key's usage must intersect with the specified usages.

    Definition Classes
    SigningOps
  45. def signBytes(bytes: ByteString, signingKey: SigningPrivateKey, usage: NonEmpty[Set[SigningKeyUsage]], signingAlgorithmSpec: SigningAlgorithmSpec = defaultSigningAlgorithmSpec)(implicit traceContext: TraceContext): Either[SigningError, Signature]

    Preferably, we sign a hash; however, we also allow signing arbitrary bytes when necessary.

    Preferably, we sign a hash; however, we also allow signing arbitrary bytes when necessary.

    Attributes
    protected[crypto]
    Definition Classes
    JcePureCryptoSigningOps
  46. val supportedEncryptionAlgorithmSpecs: NonEmpty[Set[EncryptionAlgorithmSpec]]
    Definition Classes
    JcePureCryptoEncryptionOps
  47. val supportedSigningAlgorithmSpecs: NonEmpty[Set[SigningAlgorithmSpec]]
    Definition Classes
    JcePureCryptoSigningOps
  48. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  49. implicit def toShow[A](target: A)(implicit tc: Show[A]): Ops[A]
    Definition Classes
    ToShowOps
  50. def toString(): String
    Definition Classes
    AnyRef → Any
  51. def verifySignature(bytes: ByteString, publicKey: SigningPublicKey, signature: Signature, usage: NonEmpty[Set[SigningKeyUsage]])(implicit traceContext: TraceContext): Either[SignatureCheckError, Unit]
    Definition Classes
    JcePureCryptoSigningOps
  52. def verifySignature(hash: Hash, publicKey: SigningPublicKey, signature: Signature, usage: NonEmpty[Set[SigningKeyUsage]])(implicit traceContext: TraceContext): 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
  53. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  54. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  55. 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

    (Since version 9)

Inherited from NamedLogging

Inherited from ShowUtil

Inherited from ShowSyntax

Inherited from ToShowOps

Inherited from CryptoPureApi

Inherited from RandomOps

Inherited from HashOps

Inherited from HmacOps

Inherited from SigningOps

Inherited from EncryptionOps

Inherited from AnyRef

Inherited from Any

Ungrouped