/**
 * SEA cryptography abstraction
 * @module Crypto
 * @group Crypto
 */
import { ISEAPair } from "gun";
export declare function isHash(str: string): boolean;
/**
 * @typedef {Object} Entity
 * @property {String} pub - the public key
 * @property {String} epub - the elliplic encryption epub
 */
export interface Entity {
    pub: string;
    epub: string;
}
/**
 * Encrypt data for one receiver entity
 * 1. Generates encryption secret using bob's epub and current user pair
 * 2. Enctypts data with this secret
 * @param {String} data - Stringified data to be encrypted
 * @param {SEAPair} sender - SEA Pair of the sender – `epriv` key will be used to encrypt the data
 * @param {Entity} receiver - An object with `pub` and `epub` strings - the user.is object of the reciever's account
 * @returns {Promise<string>} Encrypted data string to be sent
 */
export declare function encFor(data: string, sender: ISEAPair, receiver: Entity): Promise<string>;
/**
 * Decrypt a private message from an entity
 * 1. Generates secret using senders `epub` and current user pair
 * 2. Decrypts the data with this secret
 * @param {String} data - Encrypted private data
 * @param {Entity} sender - An object with `pub` and `epub` strings - the user.is object of the sender's account
 * @param {ISEAPair} receiver - SEA Pair of the receiver – `epriv` key will be used to encrypt the data
 * @returns {Promise<string>} Decrypted data
 */
export declare function decFrom(data: string, sender: Entity, receiver: ISEAPair): Promise<string>;
export declare function hashText(text: string): Promise<string>;
export declare function hashObj(obj: object): Promise<{
    hash: string;
    hashed: string;
}>;
/**
 * Calculate a hex hash for any string data
 * @async
 * @param {String} text
 * @param {String} salt
 * @returns {String} The hex encoded SHA-1 hash
 */
export declare function getShortHash(text: string, salt: string): Promise<string>;
export declare function safeHash(unsafe: string): string;
export declare function unsafeHash(safe: string): string;
export declare function safeJSONParse(input: string | object, def?: object): object;
