Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@aitmed/crypto-sdk
Advanced tools
Readme
These methods were built on top of TweetNaCl.js
import services from '@aitmed/crypto-sdk'
async function callSomeApi() {
const deat = await services.createUser({
phone_number: '(555)555-5555',
password: 'letmein123',
verification_code: '00000',
first_name: 'Tom',
last_name: 'Jones',
})
return deat
}
async function callSomeApi() {
const deat = await services.createEdge({
etype:'CREATE_USER',
apiVersion: 'v1beta1',
name: { phone_number: '(555)555-5555',
first_name: 'Tom',
last_name: 'Jones',}
callBack?: (deat, error)=>{
if(deat){
return deat
}
console.log(error)
},
})
return deat
}
Method | Returns | Description |
---|---|---|
Encryption/Decryption | ||
.generateAKey() | {sk:Uint8Array, pk:Uint8Array} | Generates a keyPair for assymetric encryption/decryption |
.aKeyCheck(publicKey:Uint8Array,secretKey:Uint8Array) | boolean | Checks if the keyPair is a valid one |
.aKeyEncrypt(secretKey:Uint8Array, data:Uint8Array) | Uint8Array | Assymetrically encrypts the given data using a secret key from a valid keyPair |
.aKeyDecrypt: (publicKey: Uint8Array, encryptedData: Uint8Array) | Uint8Array | Decrypts the assymetrically encrypted data using the publicKey from a valid keyPair |
.generateSKey() | Uint8Array | Generates a secretKey for symetrical encryption/decryption |
.sKeyEncrypt(secretKey: Uint8Array, data: Uint8Array) | Uint8Array | Symetrically encrypts data using a secretKey |
.sKeyDecrypt(secretKey: Uint8Array, encryptedData: Uint8Array) | Uint8Array | Decrypts the symetrically encrypted data using the secretKey it was encrypted with |
.uint8ArrayToBase64(data: Uint8Array) | string | Encodes Uint8Array value to base64 string |
.base64ToUint8Array(data: string) | Uint8Array | Decodes string value to Uint8Array |
.uTF8ToUint8Array(data: string) | Uint8Array | Decodes string and returns Uint8Array |
.uint8ArrayToUTF8(data: Uint8Array) | string | Encodes Uint8Array or Array of bytes into string |
Account | ||
.createUser | { status: success, user_id: UUID, token: string,} | creates a user |
.login | { status: success or error} | login a user |
Edges | ||
.createEdge | Edge | creates an edge |
.retrieveEdge | Edge | retrieves an edge |
FAQs
>This is the level 2 layer sdk that handles encryption/decryption.
The npm package @aitmed/crypto-sdk receives a total of 29 weekly downloads. As such, @aitmed/crypto-sdk popularity was classified as not popular.
We found that @aitmed/crypto-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.