working rss feed to nostr publish
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
import { Key } from "./Key";
|
||||
/**
|
||||
* Represents a cryptographic operation that has been instantiated but not
|
||||
* necessarily fed all data or finalized.
|
||||
*
|
||||
* @see https://msdn.microsoft.com/en-us/library/dn280996(v=vs.85).aspx
|
||||
*/
|
||||
export interface CryptoOperation {
|
||||
readonly algorithm: string;
|
||||
readonly key: Key;
|
||||
onabort: (event: Event) => void;
|
||||
oncomplete: (event: Event) => void;
|
||||
onerror: (event: Event) => void;
|
||||
onprogress: (event: Event) => void;
|
||||
readonly result: ArrayBuffer | undefined;
|
||||
abort(): void;
|
||||
finish(): void;
|
||||
process(buffer: ArrayBufferView): void;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=CryptoOperation.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"CryptoOperation.js","sourceRoot":"","sources":["../src/CryptoOperation.ts"],"names":[],"mappings":""}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* The result of a successful KeyOperation.
|
||||
*
|
||||
* @see {KeyOperation}
|
||||
* @see https://msdn.microsoft.com/en-us/library/dn302313(v=vs.85).aspx
|
||||
*/
|
||||
export interface Key {
|
||||
readonly algorithm: string;
|
||||
readonly extractable: boolean;
|
||||
readonly keyUsage: Array<string>;
|
||||
readonly type: string;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=Key.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Key.js","sourceRoot":"","sources":["../src/Key.ts"],"names":[],"mappings":""}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import { Key } from "./Key";
|
||||
/**
|
||||
* Represents the return of a key-related operation that may or may not have
|
||||
* been completed.
|
||||
*
|
||||
* @see https://msdn.microsoft.com/en-us/library/dn302314(v=vs.85).aspx
|
||||
*/
|
||||
export interface KeyOperation {
|
||||
oncomplete: (event: Event) => void;
|
||||
onerror: (event: Event) => void;
|
||||
readonly result: Key | undefined;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=KeyOperation.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KeyOperation.js","sourceRoot":"","sources":["../src/KeyOperation.ts"],"names":[],"mappings":""}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
import { CryptoOperation } from "./CryptoOperation";
|
||||
import { Key } from "./Key";
|
||||
import { KeyOperation } from "./KeyOperation";
|
||||
export type KeyUsage = "encrypt" | "decrypt" | "sign" | "verify" | "derive" | "wrapKey" | "unwrapKey" | "importKey";
|
||||
export type EncryptionOrVerificationAlgorithm = "RSAES-PKCS1-v1_5";
|
||||
export type Ie11EncryptionAlgorithm = "AES-CBC" | "AES-GCM" | "RSA-OAEP" | EncryptionOrVerificationAlgorithm;
|
||||
export type Ie11DigestAlgorithm = "SHA-1" | "SHA-256" | "SHA-384";
|
||||
export interface HashAlgorithm {
|
||||
name: Ie11DigestAlgorithm;
|
||||
}
|
||||
export interface HmacAlgorithm {
|
||||
name: "HMAC";
|
||||
hash: HashAlgorithm;
|
||||
}
|
||||
export type SigningAlgorithm = HmacAlgorithm;
|
||||
/**
|
||||
* Represent ths SubtleCrypto interface as implemented in Internet Explorer 11.
|
||||
* This implementation was based on an earlier version of the WebCrypto API and
|
||||
* differs from the `window.crypto.subtle` object exposed in Chrome, Safari,
|
||||
* Firefox, and MS Edge.
|
||||
*
|
||||
* @see https://msdn.microsoft.com/en-us/library/dn302325(v=vs.85).aspx
|
||||
*/
|
||||
export interface MsSubtleCrypto {
|
||||
decrypt(algorithm: Ie11EncryptionAlgorithm, key: Key, buffer?: ArrayBufferView): CryptoOperation;
|
||||
digest(algorithm: Ie11DigestAlgorithm, buffer?: ArrayBufferView): CryptoOperation;
|
||||
encrypt(algorithm: Ie11EncryptionAlgorithm, key: Key, buffer?: ArrayBufferView): CryptoOperation;
|
||||
exportKey(format: string, key: Key): KeyOperation;
|
||||
generateKey(algorithm: SigningAlgorithm | Ie11EncryptionAlgorithm, extractable?: boolean, keyUsages?: Array<KeyUsage>): KeyOperation;
|
||||
importKey(format: string, keyData: ArrayBufferView, algorithm: any, extractable?: boolean, keyUsages?: Array<KeyUsage>): KeyOperation;
|
||||
sign(algorithm: SigningAlgorithm, key: Key, buffer?: ArrayBufferView): CryptoOperation;
|
||||
verify(algorithm: SigningAlgorithm | EncryptionOrVerificationAlgorithm, key: Key, signature: ArrayBufferView, buffer?: ArrayBufferView): CryptoOperation;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=MsSubtleCrypto.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"MsSubtleCrypto.js","sourceRoot":"","sources":["../src/MsSubtleCrypto.ts"],"names":[],"mappings":""}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { MsSubtleCrypto } from "./MsSubtleCrypto";
|
||||
/**
|
||||
* The value accessible as `window.msCrypto` in Internet Explorer 11.
|
||||
*/
|
||||
export interface MsCrypto {
|
||||
getRandomValues: (toFill: Uint8Array) => void;
|
||||
subtle: MsSubtleCrypto;
|
||||
}
|
||||
/**
|
||||
* The `window` object in Internet Explorer 11. This interface does not
|
||||
* exhaustively document the prefixed features of `window` in IE11.
|
||||
*/
|
||||
export interface MsWindow extends Window {
|
||||
MSInputMethodContext: any;
|
||||
msCrypto: MsCrypto;
|
||||
}
|
||||
/**
|
||||
* Determines if the provided window is (or is like) the window object one would
|
||||
* expect to encounter in Internet Explorer 11.
|
||||
*/
|
||||
export declare function isMsWindow(window: Window): window is MsWindow;
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isMsWindow = void 0;
|
||||
var msSubtleCryptoMethods = [
|
||||
"decrypt",
|
||||
"digest",
|
||||
"encrypt",
|
||||
"exportKey",
|
||||
"generateKey",
|
||||
"importKey",
|
||||
"sign",
|
||||
"verify"
|
||||
];
|
||||
function quacksLikeAnMsWindow(window) {
|
||||
return "MSInputMethodContext" in window && "msCrypto" in window;
|
||||
}
|
||||
/**
|
||||
* Determines if the provided window is (or is like) the window object one would
|
||||
* expect to encounter in Internet Explorer 11.
|
||||
*/
|
||||
function isMsWindow(window) {
|
||||
if (quacksLikeAnMsWindow(window) && window.msCrypto.subtle !== undefined) {
|
||||
var _a = window.msCrypto, getRandomValues = _a.getRandomValues, subtle_1 = _a.subtle;
|
||||
return msSubtleCryptoMethods
|
||||
.map(function (methodName) { return subtle_1[methodName]; })
|
||||
.concat(getRandomValues)
|
||||
.every(function (method) { return typeof method === "function"; });
|
||||
}
|
||||
return false;
|
||||
}
|
||||
exports.isMsWindow = isMsWindow;
|
||||
//# sourceMappingURL=MsWindow.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"MsWindow.js","sourceRoot":"","sources":["../src/MsWindow.ts"],"names":[],"mappings":";;;AAYA,IAAM,qBAAqB,GAA8B;IACvD,SAAS;IACT,QAAQ;IACR,SAAS;IACT,WAAW;IACX,aAAa;IACb,WAAW;IACX,MAAM;IACN,QAAQ;CACT,CAAC;AAmBF,SAAS,oBAAoB,CAAC,MAAc;IAC1C,OAAO,sBAAsB,IAAI,MAAM,IAAI,UAAU,IAAI,MAAM,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,SAAgB,UAAU,CAAC,MAAc;IACvC,IAAI,oBAAoB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE;QAClE,IAAA,KAA8B,MAAM,CAAC,QAAQ,EAA3C,eAAe,qBAAA,EAAE,QAAM,YAAoB,CAAC;QACpD,OAAO,qBAAqB;aACzB,GAAG,CAAW,UAAA,UAAU,IAAI,OAAA,QAAM,CAAC,UAAU,CAAC,EAAlB,CAAkB,CAAC;aAC/C,MAAM,CAAC,eAAe,CAAC;aACvB,KAAK,CAAC,UAAA,MAAM,IAAI,OAAA,OAAO,MAAM,KAAK,UAAU,EAA5B,CAA4B,CAAC,CAAC;KAClD;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAVD,gCAUC"}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
export * from "./CryptoOperation";
|
||||
export * from "./Key";
|
||||
export * from "./KeyOperation";
|
||||
export * from "./MsSubtleCrypto";
|
||||
export * from "./MsWindow";
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./CryptoOperation"), exports);
|
||||
tslib_1.__exportStar(require("./Key"), exports);
|
||||
tslib_1.__exportStar(require("./KeyOperation"), exports);
|
||||
tslib_1.__exportStar(require("./MsSubtleCrypto"), exports);
|
||||
tslib_1.__exportStar(require("./MsWindow"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,gDAAsB;AACtB,yDAA+B;AAC/B,2DAAiC;AACjC,qDAA2B"}
|
||||
Reference in New Issue
Block a user