1 | /**
|
2 | * Provides encryption and decryption methods with a consistent API but
|
3 | * differing mechanisms for dealing with encryption keys.
|
4 | */
|
5 | export { KMS } from './kms';
|
6 | /**
|
7 | * Provides encryption and decryption methods using a keypair stored in S3
|
8 | */
|
9 | export declare class S3KeyPairProvider {
|
10 | /**
|
11 | * Encrypt the given string using the given public key stored in the system_bucket.
|
12 | *
|
13 | * @param {string} str - The string to encrypt
|
14 | * @param {string} [keyId] - The name of the public key to use for encryption
|
15 | * @param {string} [bucket] - the optional bucket name. if not provided will
|
16 | * use env variable "system_bucket"
|
17 | * @param {stack} [stack] - the optional stack name. if not provided will
|
18 | * use env variable "stackName"
|
19 | * @returns {Promise.<string>} the encrypted string
|
20 | */
|
21 | static encrypt(str: string, keyId?: string, bucket?: string, stack?: string): Promise<string>;
|
22 | /**
|
23 | * Decrypt the given string using a private key stored in S3
|
24 | *
|
25 | * @param {string} str - The string to decrypt
|
26 | * @param {string} [keyId] - The name of the public key to use for decryption
|
27 | * @param {string} [bucket] - the optional bucket name. Defaults to the value
|
28 | * of the "system_bucket" environment variable
|
29 | * @param {string} [stack] - the optional stack name. Defaults to the value of
|
30 | * the "stackName" environment variable
|
31 | * @returns {Promise.<string>} the decrypted string
|
32 | */
|
33 | static decrypt(str: string, keyId?: string, bucket?: string, stack?: string): Promise<string>;
|
34 | }
|
35 | export { S3KeyPairProvider as DefaultProvider };
|
36 | //# sourceMappingURL=key-pair-provider.d.ts.map |
\ | No newline at end of file |