forked from godaddy/asherah-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasherah.d.ts
49 lines (49 loc) · 2.64 KB
/
asherah.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/// <reference types="node" />
export type AsherahConfig = {
/** The name of this service (Required) */
ServiceName: string;
/** The name of the product that owns this service (Required) */
ProductID: string;
/** The amount of time a key is considered valid */
ExpireAfter: number | null;
/** The amount of time before cached keys are considered stale */
CheckInterval: number | null;
/** Determines the type of metastore to use for persisting keys (Required) { "rdbms", "dynamodb", "memory" } */
Metastore: string;
/** The database connection string (Required if metastore=rdbms) */
ConnectionString: string | null;
/** Required for Aurora sessions using write forwarding { "eventual", "global", "session" } */
ReplicaReadConsistency: string | null;
/** An optional endpoint URL (hostname only or fully qualified URI) (only supported by metastore=dynamodb) */
DynamoDBEndpoint: string | null;
/** The AWS region for DynamoDB requests (defaults to globally configured region) (only supported by metastore=dynamodb) */
DynamoDBRegion: string | null;
/** The table name for DynamoDB (only supported by metastore=dynamodb) */
DynamoDBTableName: string | null;
/** Define the maximum number of sessions to cache (Default 1000) */
SessionCacheMaxSize: number | null;
/** The amount of time a session will remain cached (Default 2h) */
SessionCacheDuration: number | null;
/** Configures the master key management service (Default kms) { "aws", "static" } */
KMS: string | null;
/** Dictionary of REGION: ARN (required if kms=aws) */
RegionMap: {
[name: string]: string;
} | null;
/** The preferred AWS region (required if kms=aws) */
PreferredRegion: string | null;
/** Configure the metastore to use regional suffixes (only supported by metastore=dynamodb) */
EnableRegionSuffix: boolean | null;
/** Enable shared session caching */
EnableSessionCaching: boolean | null;
/** Enable verbose logging output */
Verbose: boolean | null;
};
export declare function setup(config: AsherahConfig): void;
export declare function shutdown(): void;
export declare function decrypt(partitionId: string, dataRowRecord: string): Buffer;
export declare function encrypt(partitionId: string, data: Buffer): string;
export declare function decrypt_string(partitionId: string, dataRowRecord: string): string;
export declare function encrypt_string(partitionId: string, data: string): string;
export declare function set_max_stack_alloc_item_size(max_item_size: number): void;
export declare function set_safety_padding_overhead(safety_padding_overhead: number): void;