Skip to content

Commit 66e2e57

Browse files
committed
lint & format
1 parent 66dadb4 commit 66e2e57

7 files changed

Lines changed: 20 additions & 16 deletions

File tree

example/src/tests/cipher/cipher_tests.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import { Cipher, createCipheriv, randomFillSync } from 'react-native-quick-crypto';
1+
import {
2+
Cipher,
3+
createCipheriv,
4+
randomFillSync,
5+
} from 'react-native-quick-crypto';
26
import { expect } from 'chai';
37
import { test } from '../util';
48

59
const SUITE = 'cipher';
6-
const key = "secret";
10+
const key = 'secret';
711
const iv = randomFillSync(new Uint8Array(16));
812

913
test(SUITE, 'cipher - valid algorithm', async () => {

packages/react-native-quick-crypto/cpp/cipher/HybridCipher.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <memory>
2+
13
#include "HybridCipher.hpp"
24

35
namespace margelo::nitro::crypto {
@@ -15,9 +17,7 @@ HybridCipher::final() {
1517
}
1618

1719
void
18-
HybridCipher::copy() {
19-
20-
}
20+
HybridCipher::copy() {}
2121

2222
bool
2323
HybridCipher::setAAD(
@@ -52,7 +52,7 @@ HybridCipher::setArgs(
5252
) {
5353
this->args = args;
5454
init();
55-
};
55+
}
5656

5757
void
5858
HybridCipher::init() {
@@ -67,7 +67,6 @@ HybridCipher::init() {
6767
if (cipher == nullptr) {
6868
throw std::runtime_error("Invalid Cipher Algorithm: " + args.cipherType);
6969
}
70-
7170
}
7271

7372
} // namespace margelo::nitro::crypto

packages/react-native-quick-crypto/cpp/cipher/HybridCipher.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <memory>
12
#include <openssl/evp.h>
23
#include <optional>
34

packages/react-native-quick-crypto/cpp/ed25519/HybridEdKeyPair.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#include "HybridEdKeyPair.hpp"
2-
31
#include <memory>
42
#include <string>
53

4+
#include "HybridEdKeyPair.hpp"
5+
66
namespace margelo::nitro::crypto {
77

88
std::shared_ptr<Promise<void>>

packages/react-native-quick-crypto/cpp/ed25519/HybridEdKeyPair.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#include <memory>
12
#include <openssl/evp.h>
23
#include <openssl/err.h>
3-
#include <memory>
44
#include <string>
55

66
#include "HybridEdKeyPairSpec.hpp"

packages/react-native-quick-crypto/src/cipher.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ import {
2929
} from './utils/cipher';
3030

3131
type CipherArgs = {
32-
cipherType: string,
33-
cipherKey: BinaryLikeNode,
34-
isCipher: boolean,
35-
options: Record<string, TransformOptions>,
36-
iv: BinaryLike,
32+
cipherType: string;
33+
cipherKey: BinaryLikeNode;
34+
isCipher: boolean;
35+
options: Record<string, TransformOptions>;
36+
iv: BinaryLike;
3737
};
3838

3939
class CipherCommon extends Stream.Transform {

packages/react-native-quick-crypto/src/specs/cipher.nitro.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface Cipher extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
1313
final(): ArrayBuffer;
1414
copy(): void;
1515
setArgs(args: CipherArgs): void;
16-
setAAD(data: ArrayBuffer, plaintextLength?: number) : boolean;
16+
setAAD(data: ArrayBuffer, plaintextLength?: number): boolean;
1717
setAutoPadding(autoPad: boolean): boolean;
1818
setAuthTag(tag: ArrayBuffer): boolean;
1919
getAuthTag(): ArrayBuffer;

0 commit comments

Comments
 (0)