From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- .../web/api/subtlecrypto/genereranyckel/index.html | 197 +++++++++++++++++++++ files/sv-se/web/api/subtlecrypto/index.html | 83 +++++++++ files/sv-se/web/api/subtlecrypto/signum/index.html | 122 +++++++++++++ 3 files changed, 402 insertions(+) create mode 100644 files/sv-se/web/api/subtlecrypto/genereranyckel/index.html create mode 100644 files/sv-se/web/api/subtlecrypto/index.html create mode 100644 files/sv-se/web/api/subtlecrypto/signum/index.html (limited to 'files/sv-se/web/api/subtlecrypto') diff --git a/files/sv-se/web/api/subtlecrypto/genereranyckel/index.html b/files/sv-se/web/api/subtlecrypto/genereranyckel/index.html new file mode 100644 index 0000000000..b25a00bf7f --- /dev/null +++ b/files/sv-se/web/api/subtlecrypto/genereranyckel/index.html @@ -0,0 +1,197 @@ +--- +title: SubtilKrypto.GenereraNyckel() +slug: Web/API/SubtleCrypto/genereraNyckel +tags: + - API + - Metoder + - Referenser + - SubtilKrypto + - Webb Krypto API +translation_of: Web/API/SubtleCrypto/generateKey +--- +

{{APIRef("Web Crypto API")}}

+ +

SubtilKrypto.genereraNyckel()  metoden returnerar en {{jsxref("Promise")}} av en nybildad {{domxref("CryptoKey")}}, för symmetriska algoritmer, eller en {{domxref("CryptoKeyPair")}}, innehållande två nyutvecklade nycklar, för asymmetrisk algoritm, som matchar algoritmen, användningarna och extraherbarheten ges som parametrar.

+ +

Syntax

+ +
var resultat = crypto.subtle.genereraNyckel(algo, extraherbart,nyckelBruk);
+
+ +

Parametrar

+ + + +

Returvärde

+ + + +

Undantag

+ +

Löftet avvisas när följande undantag uppstår:

+ + + +

Specifikationer

+ + + + + + + + + + + + + + +
SpecifikationStatusKommentar
{{ SpecName('Web Crypto API', '#dfn-SubtleCrypto-method-generateKey', 'SubtleCrypto.generateKey()') }}{{ Spec2('Web Crypto API') }}Initial definition.
+ +

Webbläsarkompatibilitet

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionChromeEdgeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
grundläggande stöd{{ CompatChrome(37) }}{{CompatVersionUnknown}}{{ CompatGeckoDesktop(34) }}{{ CompatNo() }}13{{ CompatNo }}
ECDSA{{CompatVersionUnknown}}{{CompatUnknown}}{{ CompatGeckoDesktop(36) }}{{ CompatNo() }}{{ CompatUnknown() }}{{ CompatNo() }}
DH{{ CompatNo() }}{{CompatUnknown}}{{ CompatGeckoDesktop(35) }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunktionAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
grundläggande stöd{{CompatVersionUnknown}}37{{CompatVersionUnknown}}{{ CompatGeckoMobile(34) }}{{ CompatNo }}{{ CompatUnknown() }}{{ CompatNo }}
ECDSA{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{ CompatGeckoMobile(36) }}{{ CompatNo }}{{ CompatUnknown() }}{{ CompatNo }}
DH{{ CompatNo() }}{{CompatVersionUnknown}}{{CompatUnknown}}{{ CompatGeckoMobile(35) }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+ +

 

+ +

 

+
+ +

Se även

+ + diff --git a/files/sv-se/web/api/subtlecrypto/index.html b/files/sv-se/web/api/subtlecrypto/index.html new file mode 100644 index 0000000000..881c36812c --- /dev/null +++ b/files/sv-se/web/api/subtlecrypto/index.html @@ -0,0 +1,83 @@ +--- +title: SubtleCrypto +slug: Web/API/SubtleCrypto +tags: + - API + - Interface + - NeedsTranslation + - Reference + - TopicStub + - Web Crypto API +translation_of: Web/API/SubtleCrypto +--- +

{{APIRef("Web Crypto API")}}

+ +

The SubtleCrypto interface represents a set of cryptographic primitives. It is available via the {{domxref("Crypto.subtle")}} properties available in a window context (via {{domxref("Window.crypto")}}).

+ +
+

Per the spec: "Developers making use of the SubtleCrypto interface are expected to be aware of the security concerns associated with both the design and implementation of the various algorithms provided. The raw algorithms are provided in order to allow developers maximum flexibility in implementing a variety of protocols and applications, each of which may represent the composition and security parameters in a unique manner that necessitate the use of the raw algorithms."

+
+ +

Properties

+ +

This interface neither inherits, nor implements, any property.

+ +

Methods

+ +

This interface doesn't inherit any method.

+ +
+
{{domxref("SubtleCrypto.encrypt()")}}
+
Returns a {{jsxref("Promise")}} of the encrypted data corresponding to the clear text, algorithm and key given as parameters.
+
{{domxref("SubtleCrypto.decrypt()")}}
+
Returns a {{jsxref("Promise")}} of the clear data corresponding to the encrypted text, algorithm and key given as parameters.
+
{{domxref("SubtleCrypto.sign()")}}
+
Returns a {{jsxref("Promise")}} of the signature corresponding to the text, algorithm and key given as parameters.
+
{{domxref("SubtleCrypto.verify()")}}
+
Returns a {{jsxref("Promise")}} of a {{jsxref("Boolean")}} value indicating if the signature given as parameter matches the text, algorithm and key also given as parameters.
+
{{domxref("SubtleCrypto.digest()")}}
+
Returns a {{jsxref("Promise")}} of a digest generated from the algorithm and text given as parameters.
+
{{domxref("SubtleCrypto.generateKey()")}}
+
Returns a {{jsxref("Promise")}} of a newly generated {{domxref("CryptoKey")}}, for symmetrical algorithms, or a {{domxref("CryptoKeyPair")}}, containing two newly generated keys, for asymmetrical algorithm, that matches the algorithm, the usages and the extractability given as parameters.
+
{{domxref("SubtleCrypto.deriveKey()")}}
+
Returns a {{jsxref("Promise")}} of a newly generated {{domxref("CryptoKey")}} derived from a master key and a specific algorithm given as parameters.
+
{{domxref("SubtleCrypto.deriveBits()")}}
+
Returns a {{jsxref("Promise")}} of a newly generated buffer of pseudo-random bits derived from a master key and a specific algorithm given as parameters.
+
{{domxref("SubtleCrypto.importKey()")}}
+
Returns a {{jsxref("Promise")}} of a {{domxref("CryptoKey")}} corresponding to the format, the algorithm, the raw key data, the usages and the extractability given as parameters.
+
{{domxref("SubtleCrypto.exportKey()")}}
+
Returns a {{jsxref("Promise")}} of a buffer containing the key in the format requested.
+
{{domxref("SubtleCrypto.wrapKey()")}}
+
Returns a {{jsxref("Promise")}} of a wrapped symmetric key for usage (transfer, storage) in insecure environments. The wrapped buffer returned is in the format given in parameters, and contains the key wrapped by the given wrapping key with the given algorithm.
+
{{domxref("SubtleCrypto.unwrapKey()")}}
+
Returns a {{jsxref("Promise")}} of a {{domxref("CryptoKey")}} corresponding to the wrapped key given in parameter.
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('Web Crypto API', '#subtlecrypto-interface', 'SubtleCrypto') }}{{ Spec2('Web Crypto API') }}Initial definition.
+ +

Browser compatibility

+ + + +

{{Compat("api.SubtleCrypto")}}

+ +

See also

+ + diff --git a/files/sv-se/web/api/subtlecrypto/signum/index.html b/files/sv-se/web/api/subtlecrypto/signum/index.html new file mode 100644 index 0000000000..f3f07acac8 --- /dev/null +++ b/files/sv-se/web/api/subtlecrypto/signum/index.html @@ -0,0 +1,122 @@ +--- +title: SubtilKrypto.signum() +slug: Web/API/SubtleCrypto/signum +tags: + - API + - Metoder + - Referenser + - Signum + - SubtilKrypto + - Webb Krypto API +translation_of: Web/API/SubtleCrypto/sign +--- +

{{APIRef("Web Crypto API")}}

+ +

SubtilKrypto.signum() metoden returnerar en {{jsxref("Promise")}} innehållande {{glossary("signature")}} motsvarar texten, algoritmen och {{glossary("key")}} avkastas som parametrar.

+ +

Syntax

+ +
var alias = krypto.subtil.signum(algo, nyckel, text2signum);
+
+ +

Parameterar

+ + + +

Returvärde

+ + + +

Undantag

+ +

Tillståndet nekas när följande anomali uppstår:

+ + + +

Specifikationer

+ + + + + + + + + + + + + + +
SpecifikationerStatusKommentar
{{ SpecName('Web Crypto API', '#dfn-SubtleCrypto-method-sign', 'SubtleCrypto.sign()') }}{{ Spec2('Web Crypto API') }}Initial definition.
+ +

Webbläsarkompatibilitet

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FunktionChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Grundläggande stöd{{ CompatChrome(37) }}{{CompatVersionUnknown}}{{ CompatGeckoDesktop(34) }}{{ CompatNo() }}{{ CompatUnknown() }}{{ CompatNo }}
+
+ +
Funktion + + + + + + + + + + + + + + + + + + + + + + + +
 AndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Grundläggande stöd{{CompatVersionUnknown}}37{{CompatVersionUnknown}}{{ CompatGeckoMobile(34) }}{{ CompatNo }}{{ CompatUnknown() }}{{ CompatNo }}
+
+ +

Se även

+ + -- cgit v1.2.3-54-g00ecf