trait SubtleCrypto extends Object
w3c ¶14 Subtle Crytpo interface
The SubtleCrypto interface represents a set of cryptographic primitives. It is available via the Crypto.subtle properties available in a window context (via Window.crypto).
MDN
- Annotations
- @JSType() @native()
- Alphabetic
- By Inheritance
- SubtleCrypto
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
decrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): Promise[Any]
Returns a Promise of the clear data corresponding to the encrypted text, algorithm and key given as parameters.
Returns a Promise of the clear data corresponding to the encrypted text, algorithm and key given as parameters. MDN
Defined at ¶14.3.2 The decrypt method
-
def
deriveBits(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, length: Double): Promise[Any]
Returns a Promise of a newly generated buffer of pseudo-random bits derivated from a master key and a specific algorithm given as parameters.
Returns a Promise of a newly generated buffer of pseudo-random bits derivated from a master key and a specific algorithm given as parameters. MDN
Defined at ¶14.3.8 The deriveBits method
-
def
deriveKey(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, derivedKeyType: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: Array[KeyUsage]): Promise[Any]
Returns a Promise of a newly generated CryptoKey derivated from a master key and a specific algorithm given as parameters.
Returns a Promise of a newly generated CryptoKey derivated from a master key and a specific algorithm given as parameters. MDF
Defined at ¶14.3.7 The deriveKey method
We are being a bit more precise than the official definition by requiring KeyAlgorithmIdentifier for derivedKeyType
-
def
digest(algorithm: HashAlgorithmIdentifier, data: BufferSource): Promise[Any]
Returns a Promise of a digest generated from the algorithm and text given as parameters.
Returns a Promise of a digest generated from the algorithm and text given as parameters. MDN
Defined at ¶14.3.5 The digest method We are a bit more precise than the official definition by requiring a HashAlgorithmIdentifier rather than an AlgorithmIdentifier for the algorithm parameter.
-
def
encrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): Promise[Any]
Returns a Promise of the encrypted data corresponding to the clear text, algorithm and key given as parameters.
Returns a Promise of the encrypted data corresponding to the clear text, algorithm and key given as parameters. MDN
Defined at ¶14.3.1 The encrypt method
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exportKey(format: KeyFormat, key: CryptoKey): Promise[Any]
Returns a Promise of a buffer containing the key in the format requested.
Returns a Promise of a buffer containing the key in the format requested.
Defined at ¶14.3.10 The exportKey method
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
generateKey(algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: Array[KeyUsage]): Promise[Any]
Returns a Promise of a newly generated CryptoKey, for symmetrical algorithms, or a CryptoKeyPair, containing two newly generated keys, for asymmetrical algorithm, that matches the algorithm, the usages and the extractability given as parameters.
Returns a Promise of a newly generated CryptoKey, for symmetrical algorithms, or a CryptoKeyPair, containing two newly generated keys, for asymmetrical algorithm, that matches the algorithm, the usages and the extractability given as parameters. MDN
Defined at ¶14.3.6 The generateKey method
We are being a bit more precise than the official definition by requiring a KeyAlgorithmIdentifier rather than an AlgorithmIdentifier for the algorithm field.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
importKey(format: KeyFormat, keyData: JsonWebKey, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: Array[KeyUsage]): Promise[Any]
Returns a Promise of a CryptoKey corresponding to the format, the algorithm, the raw key data, the usages and the extractability given as parameters.
Returns a Promise of a CryptoKey corresponding to the format, the algorithm, the raw key data, the usages and the extractability given as parameters. MDN
Defined at ¶14.3.9 The importKey method
We are being a bit more precise than the official definition by requiring a KeyAlgorithmIdentifier rather than an AlgorithmIdentifier for the algorithm field.
-
def
importKey(format: KeyFormat, keyData: BufferSource, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: Array[KeyUsage]): Promise[Any]
Returns a Promise of a CryptoKey corresponding to the format, the algorithm, the raw key data, the usages and the extractability given as parameters.
Returns a Promise of a CryptoKey corresponding to the format, the algorithm, the raw key data, the usages and the extractability given as parameters. MDN
Defined at ¶14.3.9 The importKey method
We are being a bit more precise than the official definition by requiring a KeyAlgorithmIdentifier rather than an AlgorithmIdentifier for the algorithm field.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): Promise[Any]
Returns a Promise of the signature corresponding to the text, algorithm and key given as parameters.
Returns a Promise of the signature corresponding to the text, algorithm and key given as parameters. MDN
Defined at ¶14.3.3 The sign method
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unwrapKey(format: String, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: Boolean, keyUsages: Array[KeyUsage]): Promise[Any]
Returns a Promise of a CryptoKey corresponding to the wrapped key given in parameter.
Returns a Promise of a CryptoKey corresponding to the wrapped key given in parameter. MDN
Defined at ¶14.3.12 The unwrapKey method
We are being a bit more precise than the official definition by requiring a KeyAlgorithmIdentifier rather than an AlgorithmIdentifier.
-
def
valueOf(): Any
- Definition Classes
- Object
-
def
verify(algorithm: AlgorithmIdentifier, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise[Any]
Returns a Promise of a Boolean value indicating if the signature given as parameter matches the text, algorithm and key also given as parameters.
Returns a Promise of a Boolean value indicating if the signature given as parameter matches the text, algorithm and key also given as parameters. MDN
Defined at ¶14.3.4 The verify method
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): Promise[Any]
Returns a Promise of a wrapped symmetric key for usage (transfer, storage) in unsecure environments.
Returns a Promise of a wrapped symmetric key for usage (transfer, storage) in unsecure environments. The wrapped buffer returned is in the format given in parameters, and contained the key wrapped by the give wrapping key with the given algorithm.
Defined at ¶14.3.11 The wrapKey method