mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 09:15:39 +03:00
21
server/api/helpers/utils/hash.js
Normal file
21
server/api/helpers/utils/hash.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
const crypto = require('crypto');
|
||||
|
||||
module.exports = {
|
||||
sync: true,
|
||||
|
||||
inputs: {
|
||||
data: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
fn(inputs) {
|
||||
return crypto.createHash('sha256').update(inputs.data).digest('hex');
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user