Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6753087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:07:10+00:00 2026-05-26T13:07:10+00:00

im currently implementing a security module in a voting system and i was wondering

  • 0

im currently implementing a security module in a voting system and i was wondering what is the fastest way to encrypt (not hash) data in php? I was thinking something something like TEA, but i’ve never really tested the performance. I would really appreciate if someone share some know-how here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:07:11+00:00Added an answer on May 26, 2026 at 1:07 pm

    My suggestion is PHP’s mcrypt module: http://php.net/manual/en/book.mcrypt.php

    Code sample:

    // encrypt
    $data = 'data to encrypt';
    $key = 'mykey';
    $vector_size = mcrypt_get_iv_size( MCRYPT_TRIPLEDES, MCRYPT_MODE_NOFB );
    $encrypted_data = mcrypt_encrypt( MCRYPT_TRIPLEDES, substr( sha1( $key ), -9 ), $data, MCRYPT_MODE_NOFB, $vector_size );
    
    // decrypt
    $key = 'mykey';
    $vector_size = mcrypt_get_iv_size( MCRYPT_TRIPLEDES, MCRYPT_MODE_NOFB );
    $decrypted_data = rtrim( mcrypt_decrypt( MCRYPT_TRIPLEDES, substr( sha1( $key ), -9 ), $encrypted_data, MCRYPT_MODE_NOFB, $vector_size ), "\0" );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We currently have a J2EE system implementing most of the OWASP top 10 security
Hi i am currently implementing an email system for a customer in php. I'm
I'm currently implementing a very complex tree structure to allow for near-instant data access,
We are currently implementing MOSS 2007 to replace an older portal system (Plumtree) and
I am doing web based projects in dotnet. Currently I am implementing security using
I'm currently implementing a histogram that will show a very large scale data using
I am currently implementing streaming twitter api using node.js & socket.oi Wondering how does
I'm currently implementing a raytracer. Since raytracing is extremely computation heavy and since I
I'm currently implementing a JavaScript library that keeps track of the history of changes
I'm currently implementing a .NET wrapper for a Java library by using JNI to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.