# [−][src]Struct jacopone::Jacopone

`pub struct Jacopone { /* fields omitted */ }`

enviroment for encryption and decryption

## Methods

### `impl Jacopone`[src]

#### `pub fn new(thread_count: u8) -> Jacopone`[src]

```use jacopone::*;
let jacopone = Jacopone::new(4);```

#### `pub fn encrypt(&self, data: CipherData) -> Vec<u8>`[src]

encrypt given CipherData

```use jacopone::*;
let jacopone = Jacopone::new(4);
let message = "i'm not a safe algorithm".as_bytes().to_vec();
//I'm sorry, it has to be 60 bytes long
let nonce = vec![1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0];
let key = vec![12,45,8,43,1,2,65,9,1,4,7,9,1,9,3,5,2,4,9,4,1,2,6,9,1,3,6,9,1,9,4,6];
let counter = 42;

let data = CipherData::new(message, key, nonce, counter);

let ciphertext = jacopone.encrypt(data);```

## Blanket Implementations

### `impl<T, U> Into for T where    U: From<T>, `[src]

#### `fn into(self) -> U`[src]

Performs the conversion.

### `impl<T> From for T`[src]

#### `fn from(t: T) -> T`[src]

Performs the conversion.

### `impl<T, U> TryFrom for T where    T: From<U>, `[src]

#### `type Error = !`

🔬 This is a nightly-only experimental API. (`try_from`)

The type returned in the event of a conversion error.

#### `fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`[src]

🔬 This is a nightly-only experimental API. (`try_from`)

Performs the conversion.

### `impl<T> Borrow for T where    T: ?Sized, `[src]

#### `fn borrow(&self) -> &T`[src]

Immutably borrows from an owned value. Read more

### `impl<T> BorrowMut for T where    T: ?Sized, `[src]

#### `fn borrow_mut(&mut self) -> &mut T`[src]

Mutably borrows from an owned value. Read more

### `impl<T, U> TryInto for T where    U: TryFrom<T>, `[src]

#### `type Error = <U as TryFrom<T>>::Error`

🔬 This is a nightly-only experimental API. (`try_from`)

The type returned in the event of a conversion error.

#### `fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`[src]

🔬 This is a nightly-only experimental API. (`try_from`)

Performs the conversion.

### `impl<T> Any for T where    T: 'static + ?Sized, `[src]

#### `fn get_type_id(&self) -> TypeId`[src]

🔬 This is a nightly-only experimental API. (`get_type_id`)

this method will likely be replaced by an associated static

Gets the `TypeId` of `self`. Read more